/* +---------------------------------------------------------------------------+
   |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |
   |                                                                           |
   |                   http://mrpt.sourceforge.net/                            |
   |                                                                           |
   |   Copyright (C) 2005-2010  University of Malaga                           |
   |                                                                           |
   |    This software was written by the Machine Perception and Intelligent    |
   |      Robotics Lab, University of Malaga (Spain).                          |
   |    Contact: Jose-Luis Blanco  <jlblanco@ctima.uma.es>                     |
   |                                                                           |
   |  This file is part of the MRPT project.                                   |
   |                                                                           |
   |     MRPT is free software: you can redistribute it and/or modify          |
   |     it under the terms of the GNU General Public License as published by  |
   |     the Free Software Foundation, either version 3 of the License, or     |
   |     (at your option) any later version.                                   |
   |                                                                           |
   |   MRPT is distributed in the hope that it will be useful,                 |
   |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |
   |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |
   |     GNU General Public License for more details.                          |
   |                                                                           |
   |     You should have received a copy of the GNU General Public License     |
   |     along with MRPT.  If not, see <http://www.gnu.org/licenses/>.         |
   |                                                                           |
   +---------------------------------------------------------------------------+ */

#include <mrpt/opengl.h>  // Precompiled header

#include <mrpt/system.h>
#include <mrpt/utils/CFileOutputStream.h>

#include "Quad3DModel.h"

using namespace mrpt::utils;
using namespace mrpt::opengl;


/*---------------------------------------------------------------
					RobotPioneer
  ---------------------------------------------------------------*/
CSetOfObjectsPtr stock_objects::Quad3DModel()
{
	CSetOfObjectsPtr	ret = CSetOfObjects::Create();

	ret->setName("quadrotor");
     //ARM 3
		CPolyhedronPtr obj = opengl::CPolyhedron::CreateParallelepiped(TPoint3D(-0.05,-0.02,0),TPoint3D(-0.25,0,0),TPoint3D(0,0.04,0),TPoint3D(0,0,0.01));		
		ret->insert(obj);
		 //ARM 1
		 obj = opengl::CPolyhedron::CreateParallelepiped(TPoint3D(0.05,-0.02,0),TPoint3D(0.25,0,0),TPoint3D(0,0.04,0),TPoint3D(0,0,0.01));
		obj->setColor(1.0,0.0,0.0);
    ret->insert(obj);
		 //ARM 2
		obj = opengl::CPolyhedron::CreateParallelepiped(TPoint3D(-0.02,-0.05,0),TPoint3D(0.04,0,0),TPoint3D(0,-0.25,0),TPoint3D(0,0,0.01));
		ret->insert(obj);
		//ARM 4
		 obj = opengl::CPolyhedron::CreateParallelepiped(TPoint3D(-0.02,0.05,0),TPoint3D(0.04,0,0),TPoint3D(0,0.25,0),TPoint3D(0,0,0.01));
		ret->insert(obj);
		//BASE
		 obj = opengl::CPolyhedron::CreateParallelepiped(TPoint3D(-0.05,-0.05,0),TPoint3D(0.1,0,0),TPoint3D(0,0.1,0),TPoint3D(0,0,0.1));
		ret->insert(obj);
		
		
	return ret;
}



